﻿using System;
using System.Web;
using System.Web.Configuration;

public partial class MasterPage : System.Web.UI.MasterPage
{
    public string nowstr = DateTime.Now.ToString("yyyy-MM-dd");
    protected void Page_Init(object sender, EventArgs e)
    {

        if (!(Session[AppConfig.SESSION_USER_ISLOGIN] != null && Session[AppConfig.SESSION_USER_ISLOGIN].ToString() == "1"))
        {
            Response.Redirect("/login.aspx?return=" + HttpUtility.UrlEncode(Request.Url.AbsoluteUri));
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        lblUserName1.Text = Session[AppConfig.SESSION_USER_NAME].ToString();
        // lblNavigation.Text = RolePermissionsHelper.createNavigationHtml(Session[AppConfig.SESSION_USER_ROLE_ID].ToString());
    }

    protected void btnLogout_Click(object sender, EventArgs e)
    {
        Session[AppConfig.SESSION_USER_ISLOGIN] = null;
        Response.Redirect("/login.aspx?return=" + HttpUtility.UrlEncode(Request.Url.AbsoluteUri));
    }

 
}
